package com.x.client.net

import com.x.client.App
import com.x.client.bean.Car
import com.x.client.bean.NullBean
import com.x.client.bean.User
import com.x.client.utils.AppConstant
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * Creator : GG
 * Date    : 2018/6/13
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
interface ClientApi {


    /**
     * 用户登录获取验证码
     */
    @FormUrlEncoded
    @POST("controller/clientUser/getLoginValidCode")
    fun getLoginValidCode(@Field("userMobile") userMobile: String? = null): Observable<Response<NullBean>>


    /**
     * 用户登录操作
     */
    @FormUrlEncoded
    @POST("controller/clientUser/login")
    fun login(@Field("userMobile") userMobile: String? = null,
              @Field("validateCode") validateCode: String? = null): Observable<Response<User>>


//    /**
//     * 查询车辆列表
//     */
//    @FormUrlEncoded
//    @POST("controller/getCarList")
//    fun carList(@Field("pageIndex") pageIndex: Int,
//                @Field("pageSize") pageSize: Int = AppConstant.PageSize,
////                @Field("marketId") marketId: String? = App.instance.getUser()?.marketId,
////                @Field("shopId") shopId: String? = App.instance.getUser()?.shopId,
//                @Field("userId") userId: String? = null,
//                @Field("carOutColor") carOutColor: String? = null,
//                @Field("modelId") modelId: Int? = null,
//                @Field("seriesId") seriesId: Int? = null,
//                @Field("brandId") brandId: Int? = null,
//                @Field("carBargainPriceState") carBargainPriceState: Int? = null,
//                @Field("carAuthState") carAuthState: Int? = null,
//                @Field("carDetectState") carDetectState: Int? = null,
//                @Field("carStockState") carStockState: Int? = null,
//                @Field("carPledgeState") carPledgeState: Int? = null,
//                @Field("carSaleState") carSaleState: Int? = null,
//                @Field("carOrderState") carOrderState: Int? = null,
//                @Field("fromRetailPrice") fromRetailPrice: Double? = null,
//                @Field("toRetailPrice") toRetailPrice: Double? = null,
//                @Field("fromCarAge") fromCarAge: Int? = null,
//                @Field("toCarAge") toCarAge: Int? = null,
//                @Field("fromCreateTime") fromCreateTime: Int? = null,
//                @Field("toCreateTime") toCreateTime: Int? = null,
//                @Field("toCreateTime") carTypeId: Int? = null,
//                @Field("fromMileage") fromMileage: Int? = null,
//                @Field("toMileage") toMileage: Int? = null,
//                @Field("orderColunm") orderColunm: String? = null,
//                @Field("orderMode") orderMode: String? = null,
//                @Field("carCreateTime") carCreateTime: String? = null,
//                @Field("carTitle") carTitle: String? = null,
//                @Field("carEnviron") carEnviron: String? = null,
//                @Field("carVin6") carVin6: String? = null
//    ): Observable<Response<List<Car>>>










}